/**
 * @author harae Feng 
 * @date 2019-09-12 17:00:28 
 * @Last Modified by: harae Feng
 * @Last Modified time: 2019-12-24 16:35:08
 * @Describe 页面路由
 */
const router = require('koa-router')()

// const backend = 'views'

router.prefix('/v1')

// 404
router.get('/404', async (ctx, next) => {
    // ctx.response.body = '<h1>Index</h1>'
    return ctx.render(`404`)
})

// apidoc
router.get('/apidoc', async (ctx, next) => {
    return ctx.render(`apidoc/index`, {title: 'API文档'})
})

router.get('/405', async (ctx, next) => {
    // ctx.response.body = '<h1>Index</h1>'
    return ctx.render(`indextest`)
})


module.exports = router